<template>
  <div>
    <h1>体育-改变人生</h1>
    <router-link to="/indexx">体育主页</router-link>
    <router-link to="/domestic">国内体育</router-link>
    <router-link to="/foreign">国外体育</router-link>
    <router-view></router-view>
    <button @click="ran">随机显示</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: ['/indexx','/domestic','/foreign'],
    }
  },
  methods: {
    ran() {
      this.$router.push(this.list[Math.floor(Math.random()*3)])
    }
  },
}
</script>

<style></style>
